const app = getApp()

Page({
  data: {
  
  },

  onLoad: function (options) {
    
    var that = this;
    var userId = wx.getStorageSync('userId');
    
    that.setData({
     
      type: options.type,
    });
    that.couponlist(userId);//获取个人订单
    
  },
  
  //提现记录
  couponlist: function (userId) {
    var that = this;
    wx.request({
      url: app.globalData.apiUrl + 'User/couponlist',
      data: {
        
        userId: wx.getStorageSync('userId'),
        type: this.data.type,
      },

      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        if (res.data != null) {
          that.setData({
            couponlist: res.data,
          })
          console.log(that.data.couponlist, '提现记录')
        }
      }
    })
  },
})